# cmake_minimum_required(VERSION 3.10)

# project(OFDM)

# # 设置C++标准
# set(CMAKE_CXX_STANDARD 11)
# set(CMAKE_CXX_STANDARD_REQUIRED ON)
# # 
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
# set(CMAKE_BUILD_TYPE Debug)
# set(
#     BOOST_LIBRARIES
#     boost_system
#     boost_filesystem
# )
# # 添加可执行文件
# add_executable(${PROJECT_NAME} main.cpp)

# # 添加头文件目录
# target_include_directories(${PROJECT_NAME} PRIVATE inc)

# # 添加源文件
# add_subdirectory(src)

# # 链接库文件和可执行文件
# # target_link_libraries(ofdm_exe PRIVATE myfft qpsk_mod read_signal process_data SSB DMRS my_usrp)
# target_link_libraries(${PROJECT_NAME} fftw3 uhd pthread ${BOOST_LIBRARIES})

# # 设置 FFTW 的路径
# # path must root path
# # use "locate libfftw3" check directory path after installing fftw3 directory
# # set(FFTW_ROOT /home/myf/Documents/fftw-3.3.10/)

# # 链接FFTW库
# # find_library(FFTW_LIBRARY fftw3 PATHS ${FFTW_ROOT}/lib)
# # target_link_libraries(ofdm_exe PRIVATE ${FFTW_LIBRARY})




cmake_minimum_required(VERSION 3.12)
project(OFDM)

set(CMAKE_CXX_STANDARD 14)
SET(CMAKE_BUILD_TYPE DEBUG) 
set(BOOST_LIBRARIES 
	boost_system
	boost_filesystem
	boost_thread)

# 设置源文件
set(SOURCE_FILES
        src/main.cpp
        src/DMRS.cpp
        src/my_usrp.cpp
        src/myfft.cpp
        src/process_data.cpp
        src/qpsk_mod.cpp
        src/read_signal.cpp
        src/SSB.cpp)

# 设置头文件路径
include_directories(inc)

# 添加可执行文件
add_executable(OFDM ${SOURCE_FILES})
# set(FFTW_ROOT ~/Documents/fftw-3.3.10/)
# find_library(FFTW_LIBRARY
#         NAMES fftw3 
#         PATHS ${FFTW_ROOT}/lib)
# target_link_libraries(TEST ${FFTW_LIBRARY})
target_link_libraries(OFDM /usr/local/lib/libfftw3.a /usr/local/lib/libuhd.so ${BOOST_LIBRARIES})
# message(STATUS "fftw3 = ${FFTW_LIBRARY}")